import {Component} from '@angular/core';
import {IonicPage, NavController, NavParams, ViewController} from 'ionic-angular';
import {SystemService} from "../../service/SystemService";

/**
 * Generated class for the BudgetUnitPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */


@Component({
    selector: 'page-budget-year',
    templateUrl: 'budget-year.html',
    providers: [SystemService]
})
export class BudgetYearPage {
    title: string = '年度预算';
    dataList: any;
    type: number = 0;

    constructor(public navCtrl: NavController, public navParams: NavParams, public sys: SystemService) {

    }

    ionViewDidLoad() {
        this.getYearList();
    }

    getYearList(){
        this.sys.getYearsBudget().subscribe((res:any)=>{
            if(res.msgCode=='1'){
                this.dataList =res.list;
            }

        },error=>{
        })
    }


}
